#ifndef  engine_workflow_h
#define  engine_workflow_h

#include <map>
#include <string>

#include "Document.h"
#include "Work.h"

using namespace std;
using namespace ddserver::xml;

namespace ddserver
{
namespace engine 
{

class Workflow
{
public:
    Workflow();
    ~Workflow();

    bool load(const string &workinfo);
    bool run(const string &work, const string &input, string &output);
    bool loadjson(const string &workinfo);
    void show();
    
private:
    bool load_plugin(Work* work, Element & elem);

private:
    std::map<string, Work *> m_works;
};

}
}
#endif // engine_workflow_h
